<?php 

	class MineController extends CommonController{

		
		public function __init(){
			parent:: __init();
			
		}

		public function index(){

			//调出首页左侧二级菜单的数据
			$cate = K('Shop_category')->where('pid=0')->order('sort asc')->all();

			$this->assign('cate',$cate);
			//调取订单表和订单列表的数据
			$orderData = M()->join('__shop_oder__ o JOIN __shop_oder_list__ ol ON o.oid=ol.shop_oder_oid')->all();
			// p($orderData);
			$this->assign('orderData',$orderData);

			$this->dis('mine');
		}

		//头部购物车异步调用的方法
		public function gengxin(){

		    $data = K('Shop_cart')->getField('jiesuan',true);
		    foreach ($data as $k => $v) {
		        $tem = unserialize($v);
		    }
		    // p($tem);
		    // p($_SESSION);
		    $this->ajax($tem);
		    
		}
	}













 ?>